count_bar_generate_y <- function(vec_temp = c()){
  vec_temp <- as.character(vec_temp)
  for(i in 1:length(vec_temp)){
    if(is.na(vec_temp[i])){
      vec_temp[i] <- "NA Inputs"
    }
    if(is.null(vec_temp[i])){
      vec_temp[i] <- "NULL Inputs"
    }
  }
  type_vec <- unique(vec_temp)
  count_vec <- rep(0, length(type_vec))
  for(i in 1:length(type_vec)){
    count_vec[i] <- length(vec_temp[vec_temp == type_vec[i]])
  }
  out_df <- data.frame(type_vec, count_vec)
  names(out_df) <- c("types", "count")
  return(out_df)
}

#### Test Area ####

# count_bar_generate_y(c(rep("立项", 3), rep("伦理", 4)))
